﻿{extend name="public/basic"/}
{block name="main"}
    {auth:button rule="home/pages/add" rules="$buttons"}<button action="dialog" action-url="{:url('add')}" class = "layui-btn layui-btn-success">新增</button>{/auth:button}
    <table class="layui-table">
        <thead>
            <tr>
                <th>ID</th>
                <th>页面名称</th>
                <th>页面别名</th>
                <th>页面类型</th>
                <th>页面状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
            <tr>
                <td>{$vo.id}</td>
                <td>{$vo.name}</td>
                <td>{$vo.keyword_en}</td>
                <td>{if condition="$vo.type eq 0"}文章{else/}{if condition="$vo.type eq 1"}文件{else/}代码{/if}{/if}</td>
                <td>{if condition="$vo['status'] eq 'Y'"}是{else}否{/if}</td>
                <td>
                    {auth:button rule="home/pages/edit" rules="$buttons"}<i action = "dialog" action-url = "{:url('edit', 'id='.$vo['id'])}" class="layui-icon layui-icon-edit" action-title="编辑" title = "编辑"></i>{/auth:button}
                    {auth:button rule="home/pages/del" rules="$buttons"}<i action="del" action-url="{:url('del','id='.$vo['id'])}"  class="layui-icon layui-icon-delete"   title="删除"></i>{/auth:button}
                </td>
            </tr>

            </tr>
        {/volist}
        </tbody>
    </table>
    {$list->render()}

{/block}